package com.java_enum_goods;

public class Who {
    private static   Goods[] goods;

    public Who(Goods[] goods) {
        this.goods = goods;
    }

    public static  Goods[] getGoods() {
        return goods;
    }

    public void setGoods(Goods[] goods) {
        this.goods = goods;
    }

    public static void print(Goods[] goods){
        System.out.println("****************欢迎进入商品批发市场**************");
        System.out.println("编号\t"+"商品\t\t"+"价格");
        for (int i = 0; i < goods.length; i++) {

            System.out.println(goods[i].getNum()+"\t\t"+goods[i].getName()+"\t\t"+goods[i].getPrice());
        }
    }


    public static double tatal(int num,int count){
       return goods[num-1].getPrice()*count;
    }
}
